unit StokGrupTanimlari;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FormClassEmptyList, Menus, DB, ADODB, ImgList, XPMan, StdActns,
  ActnList, StdCtrls, Buttons, fcLabel, Grids, Wwdbigrd, Wwdbgrid,
  ExtCtrls, fcStatusBar;

type
  TfmStokGrupTanimlari = class(TfmFormClassEmptyList)
    btKaydet: TBitBtn;
    btDuzelt: TBitBtn;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure btKaydetClick(Sender: TObject);
    procedure btDuzeltClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmStokGrupTanimlari: TfmStokGrupTanimlari;

implementation
uses data;

{$R *.dfm}

procedure TfmStokGrupTanimlari.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  Action := caFree;
  fmStokGrupTanimlari := nil;
end;

procedure TfmStokGrupTanimlari.FormShow(Sender: TObject);
begin
  inherited;
  OpenQueryOnDataSet(aqEntry.SQL.Text, aqEntry);
end;

procedure TfmStokGrupTanimlari.btKaydetClick(Sender: TObject);
begin
  inherited;
  if aqEntry.State in [dsedit, dsinsert] then
    aqEntry.Post;
  aqEntry.UpdateBatch;
end;

procedure TfmStokGrupTanimlari.btDuzeltClick(Sender: TObject);
begin
  inherited;
  aqEntry.Edit;
end;

end.

